package Inheritance;

public class Extends_Demo {
    public static void main(String[] args) {
        SoneClass son = new SoneClass();
        son.methord();
        System.out.println("孩子的名称是："   +  son.name);

        System.out.println("=================");

        /* 父类的指针指向子类的对象 */
        FatherClass father = new SoneClass();
//        father.doSomething();
        System.out.println("父亲的名称是 " + father.name);
    }
}

